package com.ice.work.moment.ticket.producer;

import com.honeybee.cloud.framework.rocket.producer.AbstractProducer;
import com.ice.work.moment.facade.rocket.common.ProducerGroupName;
import org.apache.rocketmq.spring.autoconfigure.RocketMQProperties;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Description MQ消费者
 * @Author DELL
 * @Create 2019-04-04
 * @Since 1.0.0
 */
@Component
public class RocketProducer extends AbstractProducer  {
    @Resource
    private RocketMQProperties rocketMQProperties;

    @Override
    public void afterPropertiesSet() throws Exception {
        this.init(rocketMQProperties.getNameServer(), ProducerGroupName.PRODUCER_REPAY_STATUS_GROUP);
        this.startProducerGroup();
    }
}
